package com.xpffly.design.composite.demo.service.impl;

import com.xpffly.design.composite.demo.service.ILeaf;

/**
 * @Author: 午夜学徒
 * @Date: 2022/3/25 15:28
 * @Description：
 */
public class Leaf implements ILeaf {
    /**
     * 叶子节点名称
     */
    private String name;
    /**
     * 叶子结点 职位
     */
    private String position;
    /**
     * 叶子结点 薪水
     */
    private int salary;

    public Leaf(String name, String position, int salary) {
        this.name = name;
        this.position = position;
        this.salary = salary;
    }

    public String getInfo() {
        return "名称：" + this.name + "\t职位：" + this.position + "\t薪水：" + this.salary;
    }
}
